﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProgNetComponentsDx.Base.Classes;
using System.Data;
using ProgNetComponents.Collections;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using ProgNetComponentsDx.Data.Design;
using System.Drawing.Design;
using ProgNetComponents.Design.Attributes;

namespace ProgNetComponentsDx.Data
{
    public class SelectDataSettings : BaseSettings
    {
        public SelectDataSettings(object owner, SelectDataProvider provider) : base(owner, provider)
        {

        }
        private NamedObjectCollection _Parameters = new NamedObjectCollection();

        [Editor(typeof(SelectDataNameEditor), typeof(UITypeEditor))]
        [RefreshProperties(System.ComponentModel.RefreshProperties.All)]
        [System.ComponentModel.NotifyParentProperty(true)]
        [AlwaysSerialize]
        public object SelectDataId
        {
            get;
            set;
        }

        [HiddenByPropertyValue("SelectDataId", null, "")]
        [RefreshProperties(System.ComponentModel.RefreshProperties.All)]
        [System.ComponentModel.NotifyParentProperty(true)]
        [DefaultValue(null)]
        public DataSet DataSet
        {
            get;
            set;
        }

        [HiddenByPropertyValue("SelectDataId", null, "")]
        [System.ComponentModel.NotifyParentProperty(true)]
        public bool RefreshBrowserCache
        {
            get;
            set;
        }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [HiddenByPropertyValue("SelectDataId", null, "")]
        [System.ComponentModel.NotifyParentProperty(true)]
        public NamedObjectCollection Parameters
        {
            get { return _Parameters; }
        }
    }
}
